home *** CD-ROM | disk | FTP | other *** search
/ Gold Medal Software 2 / Gold Medal Software Volume 2 (Gold Medal) (1994).iso / os2 / cenvi2.arj / BCKGRND.CMD < prev    next >
OS/2 REXX Batch file  |  1993-10-31  |  717b  |  27 lines

  1. EXTPROC CEnvi
  2.  
  3. // Bckgrnd.cmd - Load and display a new background file
  4. #include <PMdll.lib>
  5.  
  6. main(argc,argv)
  7. {
  8.    if ( argc != 2  ||  !strcmp(argv[1],"/?")  ||  !strcmpi(argv[1],"help") )
  9.       Instructions();
  10.    else {
  11.       if ( NULL != (DesktopObject = WinQueryObject("<WP_DESKTOP>")) ) {
  12.          sprintf(SetupString,"BACKGROUND=%s;ICONVIEW=NONFLOWED,MINI;",argv[1]);
  13.          WinSetObjectData(DesktopObject,SetupString);
  14.       }
  15.    }
  16. }
  17.  
  18. Instructions()
  19. {
  20.    printf("\n")
  21.    printf("Bckgrnd - Change desktop background image\n")
  22.    printf("\n")
  23.    printf("USAGE: BCKGRND <FileSpec>\n")
  24.    printf("WHERE: FileSpec is the name of an image file to make new background\n")
  25.    printf("\n")
  26. }
  27.